<div class="art-post">
    <div class="art-post-tl"></div>
    <div class="art-post-tr"></div>
    <div class="art-post-bl"></div>
    <div class="art-post-br"></div>
    <div class="art-post-tc"></div>
    <div class="art-post-bc"></div>
    <div class="art-post-cl"></div>
    <div class="art-post-cr"></div>
    <div class="art-post-cc"></div>
    <div class="art-post-body">
        <div class="art-post-inner art-article">
            <h2 class="art-postheader">[Danh sách block]</h2>
            <br/><br/>
            <input type="button" value="Thêm block" onclick="window.location='<?php echo Utility::getSiteUrl(); ?>/template/add/block/<?php echo $id;?>'" />
            <form action="<?php echo Utility::currentUrl(); ?>" method="post">
                <table class="item-list">
                    <thead>
                    <tr>
                        <th><a id="toggle-all"></a></th>
                        <th><a href="">Tên block</a></th>
                        <th><a href="">Mô tả</a></th>
                        <th><a href="">Đường dẫn</a></th>
                        <th><a href="">General</a></th>
                        <th><a href="">Options</a></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php
            $size = $data->getSize();
                    if($size > 0)
                    {
                    for($i = 0;$i < $size; $i++)
                    {
                    $row = $data->getRow($i);
                    ?>
                    <tr>
                        <td><input type="checkbox" name="cb[]" value="<?php echo $row->id; ?>"/></td>
                        <td style="padding-left:5px;padding-right:5px"><a
                            href="<?php echo Utility::getSiteUrl() . '/template/detail/' . $row->id;?>"
                            title="Chi tiết giao diện"><strong><?php echo $row->name; ?></strong></a></td>
                        <td>
                            <?php echo $row->description; ?>
                        </td>

                        <td>
                            <?php echo $row->path; ?>
                        </td>
                        <td>
                            <?php echo $row->is_general; ?>
                        </td>
                        <td>
                            <a href="<?php echo Utility::getSiteUrl() . '/template/detail/' . $row->id;?>"
                               title="Chi tiết"
                               class="icon-edit"></a>
                            <a href="<?php echo Utility::getSiteUrl() . '/template/remove/' . $row->id;?>" title="Xóa"
                               class="icon-remove"></a>
                        </td>
                    </tr>
                    <?php
                }
            }
            else
            {
                ?>
                    <tr>
                        <td colspan="7  " style="color:red;font-weight:bold">Không có block nào</td>
                    </tr>
                    <?php
            }
            ?>
                    </tbody>
                </table>
            </form>
        </div>

        <div class="cleared"></div>
    </div>
</div>